﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Orderconsole
{
  public  class Order
    {
        private int ProductqQuantity;
        public int OrderNumber = int.MaxValue;
        public int OrderAmount;
        public string ProductName, ProductCode, CustomerName;
        public Order(string i, string j, int k)
        {
            ProductName = i;
            CustomerName = j;
            OrderNumber = k;

        }
        public override string ToString()
        {
            return "订单编码" + this.OrderNumber + "商品名称" + this.ProductName + "用户名称" + this.CustomerName;

        }
        public override bool Equals(object obj)
        {
            var order = obj as Order;
            return order != null && OrderNumber == order.OrderNumber
                && ProductName == order.ProductName
                && CustomerName == order.CustomerName;


        }

    }
}
